package com.xuhuan.admin.service.home.impl;

import com.xuhuan.admin.service.home.HomeService;
import com.xuhuan.admin.service.sysmenu.SysMenuService;
import com.xuhuan.admin.vo.sysmenu.SysMenuInfoVO;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;

/**
 * @author: huan.xu
 * @create: 2024/7/9 10:54
 * @description: 主页service实现类
 **/
@Service
public class HomeServiceImpl implements HomeService {

  @Autowired
  private SysMenuService sysMenuService;

  /**
   * 组织数据
   *
   * @param model
   */
  @Override
  public void handleData(Model model) {
    model.addAttribute("systemName", "work-util");
    List<SysMenuInfoVO> sysMenuInfoVOList = sysMenuService.findSysMenuTree();
    model.addAttribute("sysMenuList",sysMenuInfoVOList);
  }
}
